package com.sian.user.service;

import java.util.List;

import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.sian.user.mapper.IUserMapper;
import com.sian.user.pojo.UserPojo;

@Service
public class UserServiceImpl implements UserService {
	@Autowired
	private IUserMapper user;
	public List<UserPojo> getuserByPage(int page, int rows) {
		
		
		PageHelper.startPage(page, 100,"USER_ID");
		Page<UserPojo> ee = user.selectUsers();
		System.out.println(ee.size()+"   "+ee.getTotal());
		System.out.println(ee.getResult().get(0).getUSER_NAME());
		//PageInfo<UserPojo> pageInfo = new PageInfo<UserPojo>(ui);
		return ee;
	}
	
}
